import {createApp} from 'vue';
import './assets/style/style.css';
import App from './App.vue';
import router from './router';

import store from "./store"; // VUEX
import { createPinia } from 'pinia'; // pinia
import piniaPluginPersist from 'pinia-plugin-persist';

import '@/assets/style/style.css'
import "normalize.css" // CSS reset
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css';
import locale from "element-plus/es/locale/lang/zh-cn";

import * as directive from './directive'; // 自定义指令集合

const app = createApp(App) // 创建实例
// 自定义指令
Object.keys(directive).forEach((key) => {
    // @ts-ignore
    app.directive(key, directive[key])
})
app.use(router)
    .use(ElementPlus, { locale })
    .use(createPinia().use(piniaPluginPersist)) // pinia
    .use(store)
app.mount('#app')
